<template>
  <div class="exception_handling" v-show="isNone">
    <div>{{ message }}</div>
    <div class="btn_com" @click="confrom">确定</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      message: "默认信息",
      isNone: false,
    };
  },
  methods: {
    show(message = "默认信息", duration = 65000) {
      this.message = message;
      this.isNone = true;
      setTimeout(() => {
        this.isNone = false;
        this.message = "默认信息";
      }, duration);
    },
    confrom(message = "默认信息") {
      console.log(message);
    },
  },
};
</script>

<style scoped>
.exception_handling {
  position: fixed;
  top: 50%;
  left: 0;
  width: 100%;
  height: 60px;
  border: 1px solid red;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-direction: column;
}
.btn_com {
  width: 40px;
  height: 20px;
  color: aqua;
  border: 1px solid red;
}
</style>
